"""Student URL Configuration

The `urlpatterns` list routes URLs to views. For more information please see:
    https://docs.djangoproject.com/en/4.0/topics/http/urls/
Examples:
Function views
    1. Add an import:  from my_app import views
    2. Add a URL to urlpatterns:  path('', views.home, name='home')
Class-based views
    1. Add an import:  from other_app.views import Home
    2. Add a URL to urlpatterns:  path('', Home.as_view(), name='home')
Including another URLconf
    1. Import the include() function: from django.urls import include, path
    2. Add a URL to urlpatterns:  path('blog/', include('blog.urls'))
"""
from django.contrib import admin
from django.conf import settings
from django.conf.urls.static import static
from django.template.defaulttags import url
from django.urls import path, include
import info.views
import activativies.views
from leave import urls as leave_urls
import teacher.views

urlpatterns = [
                  path('admin/', admin.site.urls),

                  path('', info.views.index),
                  path('activities/checkLog', activativies.views.checkLog),
                  path('act', activativies.views.act_list),
                  # path('admin/home/', info.views.home),

                  path('user/', info.views.get_user),  # redis测试读取用户
                  path('msg/', activativies.views.get_msg),  # 收到消息
                  path('send/', activativies.views.send_msg),  # 发消息

                  path('teacher/activities/checkLog', teacher.views.t_checkLog),
                  path('teacher/act', teacher.views.t_act_list),
                  path('teacher/person', teacher.views.t_query_person),
                  path('teacher/count/', teacher.views.get_count),  # 获取教工历史核酸检测次数统计
                  path('like/', activativies.views.like),  # 点赞
                  path('checkcount/', activativies.views.check_count),  # 累计打卡次数
                  path('comment/', activativies.views.comment),  # 评论

                  path('count/', activativies.views.get_count),  # 获取历史核酸检测次数统计
                  path('class_count/', activativies.views.get_class_count),  # 获取各班级历史核酸检测次数统计

                  path('leave/', include(leave_urls)),  # 请假系统
              ] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
